package com.ruoyi.stock2.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock2.mapper.DownTradedataFailMapper;
import com.ruoyi.stock2.domain.DownTradedataFail;
import com.ruoyi.stock2.service.IDownTradedataFailService;
import com.ruoyi.common.core.text.Convert;

/**
 * 数据下载失败Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-04-25
 */
@Service
public class DownTradedataFailServiceImpl implements IDownTradedataFailService 
{
    @Autowired
    private DownTradedataFailMapper downTradedataFailMapper;

    /**
     * 查询数据下载失败
     * 
     * @param symbol 数据下载失败ID
     * @return 数据下载失败
     */
    @Override
    public DownTradedataFail selectDownTradedataFailById(String symbol)
    {
        return downTradedataFailMapper.selectDownTradedataFailById(symbol);
    }

    /**
     * 查询数据下载失败列表
     * 
     * @param downTradedataFail 数据下载失败
     * @return 数据下载失败
     */
    @Override
    public List<DownTradedataFail> selectDownTradedataFailList(DownTradedataFail downTradedataFail)
    {
        return downTradedataFailMapper.selectDownTradedataFailList(downTradedataFail);
    }

    /**
     * 新增数据下载失败
     * 
     * @param downTradedataFail 数据下载失败
     * @return 结果
     */
    @Override
    public int insertDownTradedataFail(DownTradedataFail downTradedataFail)
    {
        return downTradedataFailMapper.insertDownTradedataFail(downTradedataFail);
    }

    /**
     * 修改数据下载失败
     * 
     * @param downTradedataFail 数据下载失败
     * @return 结果
     */
    @Override
    public int updateDownTradedataFail(DownTradedataFail downTradedataFail)
    {
        return downTradedataFailMapper.updateDownTradedataFail(downTradedataFail);
    }

    /**
     * 删除数据下载失败对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDownTradedataFailByIds(String ids)
    {
        return downTradedataFailMapper.deleteDownTradedataFailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除数据下载失败信息
     * 
     * @param symbol 数据下载失败ID
     * @return 结果
     */
    @Override
    public int deleteDownTradedataFailById(String symbol)
    {
        return downTradedataFailMapper.deleteDownTradedataFailById(symbol);
    }
}
